package CGW.dao;

import CGW.bean.Food;

import java.util.List;

public class FoodDao extends BaseDao<Food>{
    public List<Food> all(int page, int pageSize){
        return all(Food.class, page, pageSize);
    }

    public int total(){
        return count_rows(Food.class);
    }

    public Food get(int food_id){
        return get(Food.class, "food_id", food_id);
    }

    public int add(Food food){
        return add(food, "food_id");
    }

    public int update(Food food){
        return update(food, "food_id");
    }

    public int delete(int food_id){
        return delete(Food.class, "food_id", food_id);
    }
}
